# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgnomekbd
pkgver=3.26.1+2+g8d02ebd
pkgrel=2
pkgdesc="Keyboard management library"
url="https://gitlab.gnome.org/GNOME/libgnomekbd"
arch=(x86_64)
license=(LGPL)
depends=(libxklavier gtk3 dconf)
makedepends=(gobject-introspection git)
_commit=8d02ebd17b75ff3be59d9d57674d50e069bb551b  # master
source=("git+https://gitlab.gnome.org/GNOME/libgnomekbd.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
      --disable-schemas-compile --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}

# vim:set sw=2 et:
